import { onMounted, onUnmounted } from 'vue'
import createContextMenu from '@/components/createContextMenu'

const initContextMenu = () => {
  const testActions: ActionItem[] = [
    {
      shortcut: 'ctrl+z',
      action: () => {
        console.log('test')
      },
      key: 'paste'
    }
  ]
  let menu: any
  onMounted(() => {
    menu = createContextMenu(testActions)
  })
  onUnmounted(() => {
    menu.destroy()
  })
}
export default initContextMenu
